package edu.iiitb.gis.vts.action;

import java.util.ArrayList;

import com.opensymphony.xwork2.ActionSupport;

import edu.iiitb.gis.vts.service.VehicleService;

public class GetVehicleIDs extends ActionSupport {

	private static final long serialVersionUID = 5915768481974378149L;
	
	private String groupID;
	private ArrayList<String> vehicleIDs;
	
	
	public String execute() {
		VehicleService vehicleService = new VehicleService();
		vehicleIDs = vehicleService.getvehicleIDsForGroup(groupID);
		System.out.println("Number of vehicle with groupID " + groupID + "=" + vehicleIDs.size());
		return SUCCESS;
	}

	public void setVehicleIDs(ArrayList<String> vehicleIDs) {
		this.vehicleIDs = vehicleIDs;
	}

	public ArrayList<String> getVehicleIDs() {
		return vehicleIDs;
	}

	public void setGroupID(String groupID) {
		this.groupID = groupID;
	}

	public String getGroupID() {
		return groupID;
	}
}
